Skip to content

refactor(hitl): replace timezone usage with airflow.sdk.timezone - #53962

Merged
Lee-W merged 2 commits into
apache:mainfrom
astronomer:use-sdk-timezone-in-hitl
Aug 4, 2025
Merged

Lee-W merged 2 commits into
apache:mainfrom
astronomer:use-sdk-timezone-in-hitl

Conversation

@Lee-W

@Lee-W Lee-W commented Jul 31, 2025 •

Copy link
Copy Markdown
Member

Why

  • airflow.utils.timezone is deprecated
  • we have utcnow and should reuse it

What

  • Replace airflow.utils.timezone with airflow.sdk.timezone
  • Replace datetime.now(timezone.utc) with airflow.sdk.timezone.utcnow

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@Lee-W
Lee-W force-pushed the use-sdk-timezone-in-hitl branch from cdba8a5 to f2517f3 Compare August 1, 2025 09:14
@Lee-W
Lee-W merged commit 43cd2d1 into apache:main Aug 4, 2025
@Lee-W
Lee-W deleted the use-sdk-timezone-in-hitl branch August 4, 2025 09:35
@github-project-automation github-project-automation Bot moved this from In review to Done in AIP-90 - Human in the loop Aug 4, 2025
ferruzzi pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Aug 7, 2025
fweilun pushed a commit to fweilun/airflow that referenced this pull request Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants